<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            /* height: 110px; */
            width: 110px;
            border: 1px solid #000;
            margin: 100px auto;
            overflow: hidden;
        }
        /* 像元素 */
        /* 1.after和before必须要和 content使用 
           2.after和before 行内元素,设置宽高无效*/
        .box::after{
            content: 'abc';
            display: inline-block;
            background-color: red;
            height: 50px;
            width: 50px;
            float: left;
        }
        .box::before{
            content: '123';
            display: inline-block;
            background-color: green;
            height: 50px;
            width: 50px;
            float: right;
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>